package com.tcy.edu.web.controller;

import com.tcy.edu.model.User;
import com.tcy.edu.service.IUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
@RequestMapping("/user")
public class UserController {
    @Autowired
    private IUserService userService;

    @RequestMapping("/login")
    public String login(){
        System.out.println("login");
        return "default";
    }

    @RequestMapping("/find")
    public String find(Integer id){
        System.out.println("find");
        User user = userService.findUserById(id);
        System.out.println(user);
        return null;
    }
    @RequestMapping("/manage")
    public String manage(){
        return "User/manage";
    }
    @RequestMapping("/info")
    public String info(){
        return "User/info";
    }
    @RequestMapping("/update")
    public String update(){
        return "User/update";
    }
    @RequestMapping("/edit")
    public String edit(){
        return "User/edit";
    }
}
